package com.fix.demo.day1;

import java.util.Date;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class HelloController {
	
	@RequestMapping("/helloboot")
	public String hello(ModelMap map) {
		map.addAttribute("temo", "提莫");
		map.addAttribute("haha", "nihao");
		return "hello";
	}
	
	@RequestMapping("/stu")
	@ResponseBody
	public Student getStudent() {
		Student st = new Student();
		st.setStname("temo");
		st.setAge(16);
		st.setPassword("888888");
		st.setBirthday(new Date());
		
		return st;
	}

}
